<template>
  <div class="home">
    <p>{{ age }}</p>
    <p>计算属性:{{ comAge }}</p>
  </div>
</template>

<!-- setup新写法 -->
<script setup>
import { ref, computed } from 'vue'
let age = ref(18);

// 计算属性
let comAge = computed(() => {
  return age.value + 1
})
</script>
